package hoang.hut.framework.database;

import android.annotation.SuppressLint;

public class DBUtils implements DBDefinition{
	
	private static DBUtils instance = null;

	/**
	 * Constructor
	 */
	public DBUtils() {
	}
	/**
	 * Get class instance
	 * 
	 * @return
	 */
	public static DBUtils getInstance() {
		if (instance == null) {
			instance = new DBUtils();
		}
		return instance;
	}

	/**
	 * Get database version
	 * 
	 * @return
	 */
	public int getDatabaseVersion() {
		return DATABASE_VERSION;
	}

	/**
	 * Get database name
	 * 
	 * @return
	 */
	public String getDatabaseName() {
		return DATABASE_NAME;
	}

	/**
	 * Get database path
	 * 
	 * @return
	 */
	@SuppressLint("SdCardPath")
	public String getDatabasePath() {
		return "/data/data/" + getClass().getPackage().getName() + "/databases/";
	}

	/**
	 * Get database path
	 * 
	 * @return
	 */
	public String getDatabaseFullPath() {
		return getDatabasePath() + DATABASE_NAME;
	}
}
